package com.api.apicommon.model.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 接口信息状态枚举类
 */
public enum InterfaceInfoStatusEnum {
    OFFLINE("关闭",0),
    ONLINE("上线",1);
    private final String text;

    private final int value;
    InterfaceInfoStatusEnum(String text,int value){
        this.text = text;
        this.value = value;
    }
    /**
     * 获取值列表
     */
    public static List<Integer> getValues(){
        return Arrays.stream(values()).map(item -> item.value).collect(Collectors.toList());

    }

    public  int getValue(){return value;}
    public  String getText(){return text;}
}
